﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WPClient.ViewModel
{
    class ParliamentarianViewModel : ViewModelBase
    {
        #region Fields and RelayCommands

        IEnumerable<InfoCategoryViewModel> _infoCategories;
        string _name;
        string _surname;

        #endregion

        #region Public interface

        public ParliamentarianViewModel()
        {
            List<InfoCategoryViewModel> infoCategories = new List<InfoCategoryViewModel>();
            //add info categories
            //foreach(info category)
            //  add

            infoCategories.Add(new InfoCategoryViewModel("Votazioni", false));
            infoCategories.Add(new InfoCategoryViewModel("Interessi", false));
            infoCategories.Add(new InfoCategoryViewModel("Info aggiuntive", true));
            infoCategories.Add(new InfoCategoryViewModel("Statistiche", true));
        }

        #endregion

        #region Properties

        public string CompleteName
        {
            get { return Name + " " + Surname; }
        }
        public IEnumerable<InfoCategoryViewModel> InfoCategories
        {
            get { return _infoCategories; }
            set
            {
                if (value == _infoCategories)
                    return;
                _infoCategories = value;
                OnPropertyChanged("InfoCategories");
            }
        }
        public string Name
        {
            get { return _name; }
            set
            {
                if (value == _name)
                    return;
                _name = value;
                OnPropertyChanged("Name");
            }
        }
        public string Surname
        {
            get { return _surname; }
            set
            {
                if (value == _surname)
                    return;
                _surname = value;
                OnPropertyChanged("Surname");
            }
        }

        #endregion
    }
}
